package sk.stuba.fiit.arthur.web.mvc.model.cvo;
import java.io.Serializable;
/**
 * Document Common Value Object.
 * 
 * @author Marek Hruska
 */

public class DocumentCVO implements Serializable {

    private static final long serialVersionUID = -8712872385957386182L;

    private Integer id = null;
    private String name = null;
    private String description = null;

    
    /**
     * Gets id (primary key).
     */
     public Integer getId() {
        return id;
    }

    /**
     * Sets id (primary key).
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Gets name.
     */
    public String getName() {
		return name;
	}

    /**
     * Sets name.
     */
	public void setName(String name) {
		this.name = name;
	}


    /**
     * Gets description.
     */
	public String getDescription() {
		return description;
	}

    /**
     * Sets description.
     */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
     * Returns a string representation of the object.
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();

        sb.append(this.getClass().getName() + "-");
        sb.append("  id=" + id);
        sb.append("  name=" + name);
        sb.append("  description=" + description);

        return sb.toString();
    }

    /**
     * Returns a hash code value for the object.
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;

        result = prime * result + ((id == null) ? 0 : id.hashCode());

        return result;
    }

    /**
     * Indicates whether some other object is equal to this one.
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final DocumentCVO other = (DocumentCVO) obj;

        if (id == null) {
            if (other.id != null) {
                return false;
            }
        } else if (!id.equals(other.id)) {
            return false;
        }

        return true;
    }

}
